@(editForm: Form[models.cms.CMSPage],pageName:String)

@import helper._

@cms{

    <head>
    <script type="text/javascript" src='@routes.Assets.at("tiny_mce/tiny_mce.js")' ></script >
    <script type="text/javascript" >
    tinyMCE.init({
        mode : "textareas",
        theme : "advanced",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        plugins : "advimage",
        elements : 'nourlconvert',

        plugins : "advimage, advlink",

        // Theme options - button# indicated the row# only
        theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
        theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor",
        convert_urls : false,
        theme_advanced_resizing : true,
        external_image_list_url : "@routes.Admin.imagelist()"

    });
    </script >
    </head>

    @form(routes.Admin.savePage(pageName)){
        <table>
            <tr valign="top">
                @inputText(editForm("name"), 'size -> "20", '_label -> "Name")

            </tr>
            <tr valign="top">
                @inputText(editForm("title"), 'size -> "20" ,'_label -> "Title")

            </tr>
            <tr valign="top">
                @textarea(editForm("body"), 'size -> "20" ,'_label -> "Body")

            </tr>
        </table>
        <input type="submit" name="saveList" value="Save &amp; goto page list">
        <input type="submit" name="savePage" value="Save &amp; goto page">
        <input type="submit" name="delete" value="Delete">


    }
}